<?php /*a:4:{s:74:"D:\phpstudy_pro\WWW\sact\application\admin\view\reimbursement\recycle.html";i:1622702452;s:65:"D:\phpstudy_pro\WWW\sact\application\admin\view\common\\link.html";i:1622182342;s:70:"D:\phpstudy_pro\WWW\sact\application\admin\view\common\\pagestyle.html";i:1621849985;s:67:"D:\phpstudy_pro\WWW\sact\application\admin\view\common\\script.html";i:1621911862;}*/ ?>

<!-- link引入 -->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>SACT报销系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">

    <script>
        /^http(s*):\/\//.test(location.href) || alert('服务器繁忙 请稍后重试');
    </script>
</head>
<style>
    pre,blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    tr,img {
        page-break-inside: avoid;
    }
    h2,h3 {
        page-break-after: avoid;
    }
    .page-header {
        padding-bottom: 9px;
        margin: 40px 0 20px;
        border-bottom: 1px solid #eee;
    }
    .pager {
        padding-left: 0;
        margin: 20px 0;
        text-align: center;
        list-style: none;
    }
    .pager li {
        display: inline;
    }
    .pager li > a,
    .pager li > span {
        display: inline-block;
        padding: 5px 14px;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 15px;
    }
    .pager li > a:hover,
    .pager li > a:focus {
        text-decoration: none;
        background-color: #eee;
    }
    .pager .next > a,
    .pager .next > span {
        float: right;
    }
    .pager .previous > a,
    .pager .previous > span {
        float: left;
    }
    .pager .disabled > a,
    .pager .disabled > a:hover,
    .pager .disabled > a:focus,
    .pager .disabled > span {
        color: #777;
        cursor: not-allowed;
        background-color: #fff;
    }
    .pager:before,
    .pager:after,
    .pager:after,
    .pagination {
        display: inline-block;
        padding-left: 0;
        margin: 20px 0;
        border-radius: 4px;
    }
    .pagination > li {
        display: inline;
    }
    .pagination > li > a,
    .pagination > li > span {
        position: relative;
        float: left;
        padding: 6px 12px;
        margin-left: -1px;
        line-height: 1.42857143;
        color: #337ab7;
        text-decoration: none;
        background-color: #fff;
        border: 1px solid #ddd;
    }
    .pagination > li:first-child > a,
    .pagination > li:first-child > span {
        margin-left: 0;
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
    }
    .pagination > li:last-child > a,
    .pagination > li:last-child > span {
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
    }
    .pagination > li > a:hover,
    .pagination > li > span:hover,
    .pagination > li > a:focus,
    .pagination > li > span:focus {
        color: #23527c;
        background-color: #eee;
        border-color: #ddd;
    }
    .pagination > .active > a,
    .pagination > .active > span,
    .pagination > .active > a:hover,
    .pagination > .active > span:hover,
    .pagination > .active > a:focus,
    .pagination > .active > span:focus {
        z-index: 2;
        color: #fff;
        cursor: default;
        background-color: cadetblue;
        border-color: cadetblue;
    }
    .pagination > .disabled > span,
    .pagination > .disabled > span:hover,
    .pagination > .disabled > span:focus,
    .pagination > .disabled > a,
    .pagination > .disabled > a:hover,
    .pagination > .disabled > a:focus {
        color: #777;
        cursor: not-allowed;
        background-color: #fff;
        border-color: #ddd;
    }
    .pagination-lg > li > a,
    .pagination-lg > li > span {
        padding: 10px 16px;
        font-size: 18px;
    }
    .pagination-lg > li:first-child > a,
    .pagination-lg > li:first-child > span {
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
    }
    .pagination-lg > li:last-child > a,
    .pagination-lg > li:last-child > span {
        border-top-right-radius: 6px;
        border-bottom-right-radius: 6px;
    }
    .pagination-sm > li > a,
    .pagination-sm > li > span {
        padding: 5px 10px;
        font-size: 12px;
    }
    .pagination-sm > li:first-child > a,
    .pagination-sm > li:first-child > span {
        border-top-left-radius: 3px;
        border-bottom-left-radius: 3px;
    }
    .pagination-sm > li:last-child > a,
    .pagination-sm > li:last-child > span {
        border-top-right-radius: 3px;
        border-bottom-right-radius: 3px;
    }
</style>
<body>
<div class="x-body">
    <button class="layui-btn layuiadmin-btn-useradmin" style="margin: 10px;cursor: not-allowed;">回收站删除后不可恢复 同时也会删除对应的源文件
      <i class="layui-icon">&#xe62e;</i> 共有数据：<?php echo htmlentities($count); ?> 条
    </button>
<!--    <span class="x-right" style="line-height:40px">共有数据：<?php echo htmlentities($count); ?> 条</span>-->

  <table class="layui-table">
    <thead>
    <tr>
      <th style="text-align: center;">ID</th>
      <th style="text-align: center;">申请报销人</th>
      <th style="text-align: center;">性别</th>
      <th style="text-align: center;">摘要</th>
      <th style="text-align: center;">报销金额</th>
      <th style="text-align: center;">电子发票</th>
      <th style="text-align: center;">报销单</th>
      <th style="text-align: center;">时间</th>
      <th style="text-align: center;">状态</th>
      <th style="text-align: center;">操作</th>
    </thead>
    <tbody>
    <?php foreach($res as $v): ?>
    <tr>
      <td style="text-align: center;"><?php echo htmlentities($v['id']); ?></td>
      <td style="text-align: center;"><?php echo htmlentities($v['name']); ?></td>
      <td style="text-align: center;">
        <?php if($v['sex'] == 1): ?>男<?php elseif($v['sex'] == 2): ?>女<?php else: ?>中性<?php endif; ?>
      </td>
      <td style="text-align: center;"><?php echo htmlentities(cut_str($v['content'],10)); ?></td>
      <td style="text-align: center;"><b style="color: deeppink">￥</b><b><?php echo htmlentities($v['money']); ?></b></td>
      <?php $str = 'http://sact.com'; ?>
      <td style="text-align: center;">
        <?php if($v['electronic_invoice'] != ''): ?>
        <img src="<?php echo htmlentities($str.$v['electronic_invoice']); ?>">
        <?php else: ?>
        暂无图片
        <?php endif; ?>
      </td>
      <td style="text-align: center;">
        <?php if($v['reimbursement'] != ''): ?>
        <img src="<?php echo htmlentities($str.$v['reimbursement']); ?>">
        <?php else: ?>
        暂无图片
        <?php endif; ?>
      </td>

      <td style="text-align: center;">
        <?php if($v['update_time'] != ''): ?>
          <?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($v['update_time'])? strtotime($v['update_time']) : $v['update_time'])); else: ?>
          <?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($v['create_time'])? strtotime($v['create_time']) : $v['create_time'])); ?>
        <?php endif; ?>
      </td>
      <td style="text-align: center;">
        <?php if($v['status'] == 0): ?>
        <span class="layui-badge">待处理</span>
        <?php else: ?>
        <span class="layui-badge layui-bg-green">已处理</span>
        <?php endif; ?>
      </td>
      <td class="td-manage" style="text-align: center;">
        <button class="layui-btn layui-btn-xs" onclick="del(<?php echo htmlentities($v['id']); ?>)"><i class="layui-icon"></i></button>
      </td>
    </tr>
    <?php endforeach; ?>
    </tbody>
  </table>
  <div class="page" style="margin:10px"><?php echo $res; ?></div>

</div>

<!-- js引入 -->
<script type="text/javascript" src="/static/layui/lib/layui/layui.js"></script>

<script>
  layui.use(['layer'], function () {
    layer = layui.layer;
    $ = layui.jquery;
  });

  /*用户-添加*/
  function add() {
    layer.open({
      maxmin: true,
      title: '添加',
      shade: [0.8, '#393D49'],
      area: ['460px', '420px'],
      type: 2,
      content: 'addment',
    });
  }

  /*用户-编辑*/
  function edit(id) {
    layer.open({
      maxmin: true,
      title: '编辑',
      shade: [0.8, '#393D49'],
      area: ['460px', '420px'],
      type: 2,
      content: 'editment?id=' + id,
    });
  }

  /*用户-删除*/
  function del(id) {
    layer.confirm('确认要删除吗？', {
      btn: ['确认', '取消']
    }, function () {
      //发异步删除数据
      $.post('recycleBinDel', { 'id': id }, function (res) {
        if (res.code > 0) {
          layer.alert(res.msg, { icon: 5 });
        } else {
          layer.msg(res.msg);
          setTimeout(function () {
            window.location.reload()
          }, 1000);
        }
      }, 'json');
    });
  }


</script>
</body>
